<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>支付页</title>
    <link rel="shortcut icon" href="">
    <link rel="stylesheet" href="__PUBLICINDEX__/css/base.css" />
    <link rel="stylesheet" href="__PUBLICINDEX__/css/common.css" />
    <link rel="stylesheet" href="__PUBLICINDEX__/css/pay.css" />
    <script type="text/javascript" src="__PUBLICINDEX__/js/html5shiv.js"></script>
    <script type="text/javascript" src="__PUBLICINDEX__/js/respond.min.js"></script>
    <script type="text/javascript" src="__PUBLICINDEX__/js/jquery-1.11.3.min.js"></script>
</head>
<body>
    {include file="common/head"}
    <!--支付第二步-->
    <div class="secondly">
        <div class="search">
            <img src="__PUBLICINDEX__/image/logo.png" />
            <div class="w-order-nav-new">
                <ul class="nav-wrap">
                    <li>
                        <div class="no"><span>1</span></div>
                        <span class="text">确认订单</span>
                    </li>
                    <li class="to-line "></li>
                    <li class="current">
                        <div class="no"><span>2</span></div>
                        <span class="text">选择支付方式</span>
                    </li>
                    <li class="to-line "></li>
                    <li class="">
                        <div class="no"><span>3</span></div>
                        <span class="text">购买成功</span>
                    </li>
                </ul>
            </div>
        </div>
        <div class="order_infor_module">
            <div class="order_details">
                <table width="100%">
                    <tbody>
                    <tr>
                        <td class="fl_left ">
                            <ul class="order-list">
                                <li>
                                    <span class="order-list-no">订单:</span>
                                    <span class="order-list-name">{$deal->name}</span><span class="order-list-number">{$order.deal_count}份</span>
                                </li>
                            </ul>
                        </td>
                        <td class="fl_right">
                            <dl>
                                <dt>应付金额：</dt>
                                <dd class="money"><span>{$order.total_price}元</span></dd>
                            </dl>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div align="center">
            <h1 class="title">请使用微信扫码支付</h1>
            <img alt="微信扫码支付" src="__PUBLICINDEX__/image/asdasdasd.jpg" style="width:300px;height:300px;">
        </div>
    </div>
    <div class="footer">
        <ul class="first">

        </ul>
        <ul class="second">

        </ul>
    </div>
<script>
    function get_pay_status()
    {
        var url = "{:url('api/order/paystatus')}",
            pay_success_url = "{:url('pay/paysuccess')}",
            id = {$order.id};
        var data = {'id':id};
        $.post(url, data, function(res) {
            if (res.status==1) {
                self.location = pay_success_url;
            }
        }, "JSON");
    }
    window.setInterval("get_pay_status()", 2000);
</script>
</body>
</html>
